#include <fstream>
#include <iostream>
using namespace std;

#define ASSERT(TST,MSG) \
	if(! (TST) ) { \
		cout << __FILE__ << " : " << __LINE__ <<" Assertion failed: " << (#TST) \
		<< " " << MSG << endl; \
		return 0;\
	}


int main(int argc, char* argv[]) {
	ASSERT(argc == 2, "enter filename");
	ifstream f(argv[1]);

	string line;
	string command;
	unsigned int num = 0;

	while(getline(f,line)) {
		getline(cin,command);
		if(command == "quit")
			break;
		cout << ++num << " : " << line ;
	}	
}
	
